package org.compression.mapper;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.model.AttrValueRel;
import org.model.BaseModel;
import org.model.Book;
import org.model.Magazine;
import org.model.MagazineAttrs;
import org.model.MagazineValue;
import org.model.MedicalScience;
import org.model.Newmagazine;
import org.model.TCategoryModel;
import org.model.TNewMagazine;
import org.model.business.BookTranlate;
import org.model.comm.Page;

@Mapper
public interface SearchMapper {

	public List<TCategoryModel> getCategory() ;
	public List<Magazine> getMagazine() ;
	public List<Magazine> getCategoryId(String id);
	public List<Magazine> getBookRealeteShip(String id);
	public List<Newmagazine> getMaginzeId(String id);
	
	public List<Object> getMaginzeName(String name);
	
	public List<MagazineAttrs> getMaginzeAttrId(String id);
	
	//杂志
	public void insertMagazine(TNewMagazine mTNewMagazine);
	//杂志属性
	public void  insertMagazineattrs(MagazineAttrs mMagazineAttrs);
	
	//杂志关系
	public void   insertAttrValueRel(AttrValueRel mAttrValueRel);
	
	
	//杂志属性值
	public void insertMagazinevalue(MagazineValue mMagazineValue);
	
	public List<MagazineValue>  getMaginzeValue(String id);
	
	//默认属性
	public List<Newmagazine> getMaginzedeflaut(String id);

	public List<Object> getHigSearch(@Param("ids")List<String> id,@Param("values") List<String> values);
	public HashSet<String>  selectHigh(@Param("id")String id ,@Param("value") String value);
	
	public HashSet<String>  selectNOT(@Param("id")String id ,@Param("value") String value);
	
	public TNewMagazine  getMaginzeById(String id);
	
	//查询查询条件
	public List<BaseModel>   selectIdContional();

	
	// 插入医学
	public void insertMedicalScience(MedicalScience mMedicalScience);
	
	//批量插入 医学
	public void insertMedicalSciences(List<MedicalScience> mMedicalSciences);
	
	public List<Object> 	getDesc();
	
	//查询全部书名
	@Select("select id,name from t_new_magazine")
	public List<BaseModel>  getAllBook();
	
	//属性id 查询
	public List<String> selectByIdListMagazineIds(@Param("id") String id,@Param("startIndex")long startIndex,@Param("endIndex")long endIndex);

	public long countMagazineIds(@Param("id") String id,@Param("startIndex")long startIndex,@Param("endIndex")long endIndex);
	
	
	public List<BookTranlate>	commSearch(@Param("values")List<String> ids);
	
	
	
	
}